﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Baosight.ZNH.ZMCommon;
using Baosight.Platform.Core.UI.Controls;

namespace Baosight.ZNH.ZMCE.UI
{
    public partial class ZMCEB6 : EFViewCmes
    {
        public ZMCEB6()
        {
            InitializeComponent();
        }


        private void tab_SelectionChanged(object sender, RoutedEventArgs e)
        {
            RefreshData();
        }

        /// <summary>
        /// 刷新页签页面
        /// </summary>
        private void RefreshData()
        {
            if (tab.SelectedItem != null)
            {
                EFTabItem item = tab.SelectedItem as EFTabItem;
                item.Content = null;
                Dictionary<string, string> args = new Dictionary<string, string>();
                args.Add("fdEquipmentId", this.fdKeyId.Value.ToString());
                args.Add("fdStandardsForm", "0");

                if (item.Name.Equals("tab1"))
                {
                    item.LoadView("ZMCEB2", args);
                }
                else if (item.Name.Equals("tab2"))
                {
                    item.LoadView("ZMCEB3", args);
                }
                else if (item.Name.Equals("tab3"))
                {
                    item.LoadView("ZMCEB4", args);
                }
                else if (item.Name.Equals("tab4"))
                {
                    item.LoadView("ZMCEB5", args);
                }                
            }
        }

    }
}
